package com.twu.biblioteca;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Collection;

public class ReserveBookCommand implements Command {
    private Collection<String> listBookOptions = Arrays.asList("Please enter a book name to reserve.");
    LibraryCatalogue libraryCatalogue;

    public ReserveBookCommand(){
        this.libraryCatalogue = new LibraryCatalogue(System.out);
    }

    @Override
    public void execute() throws IOException {

        Menu reserveMenu = new Menu(System.out, new BufferedReader(new InputStreamReader(System.in)), listBookOptions);
        String bookToReserve = reserveMenu.promptUserInput();
        libraryCatalogue.reserveBook(bookToReserve);
    }
}
